<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    .active{
        width: 100px;
        height: 100px;
        border: 1px solid redwe;
    }
</style>
<body>

<script>
    var demo = document.createElement("div")
    console.log(demo);

    document.body.insertBefore(demo,document.body[0])
    console.log(document.body);

    demo.classList = "active"

demo.onmouseover = function(){
    demo.style.transform = "translate(10px,10px)"
    demo.style.cursor = "pointer"
}
</script>
</body>
</html>